package com.frejoys.api.factory;

import com.frejoys.api.interfaces.ApiCommonInterface;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.service.invoker.HttpServiceProxyFactory;

/**
 * 接口门面，装载自定义HttpServiceProxyFactory，将接口放入bean
 */
@Configuration
public class ApiFactory {

    @Bean
    ApiCommonInterface apiCommonInterface (HttpServiceProxyFactory httpServiceProxyFactory) {
        return httpServiceProxyFactory.createClient(ApiCommonInterface.class);
    }

}
